package edu.Test;

import java.util.*;

public class test22 {
    public static void main(String[] args) {
        String str = "how,are,you,are,you,fine";
        String[] strings = str.split(",");
        Set<String> set = new TreeSet<>(Arrays.asList(strings));
        for (String value : set) {
            System.out.println(value);
        }
        System.out.println("-----");
        for (String s:set) {
            System.out.println(s);
        }
        Circle[] c = {new Circle(6.5),new Circle(10.5),new Circle(8.6)};
        Circle circle = new Circle();
        System.out.println(circle.max(c).getR());
    }
}
class Circle{
    double r;
    public Circle(){

    }
    public Circle(double r){
        this.r = r;
    }
    public double getR(){
        return this.r;
    }
    public Circle max(Circle[] c){
        double temp = c[0].getR();
        int max = 0;
        for (int i = 0; i < c.length; i++) {
            if(temp < c[i].getR()){
                temp = c[i].getR();
                max = i;
            }
        }
        return c[max];
    }

}
